/**
 * author      : dormi330
 * date        : 2018/6/24
 * project     : mybatis
 * description : 新建订单时，提交的信息
 */

package org.wzq.learn.order;

import java.util.ArrayList;
import java.util.List;

public class InDtoCreateOrder extends BaseDto {

    public final String tenantCode;             // 租户code
    public final String memberId;               // 会员id 购买者
    public final String addressId;              // 会员收货地址id
    public List<InDtoOrderItem> orderItemList;    // 所购sku列表

    public InDtoCreateOrder(String tenantCode, String memberId, String addressId) {
        this.tenantCode = tenantCode;
        this.memberId = memberId;
        this.addressId = addressId;
        this.orderItemList = new ArrayList<InDtoOrderItem>();
    }

    public void addSkuAndQty(String sku, int qty, String remark) {
        orderItemList.add(new InDtoOrderItem(sku, qty, remark));
    }

}